package com.maimao.api.mall.goods;

import com.maimao.core.model.resp.Result;
import com.maimao.model.goods.Goods;
import com.maimao.model.goods.input.GoodsSearch;
import com.maimao.model.goods.vo.*;
import com.maimao.model.info.Collect;
import com.maimao.model.info.vo.FollowGoods;
import com.maimao.model.user.Foot;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

/**
 * @author MaoLin Wang
 * @date 2020/12/8 4:43 下午
 */
@Api(value = "商品接口")
@RequestMapping("/goods/goods")
public interface GoodsApi {

    @ApiOperation("发布宝贝")
    Result<?> publish(GoodsPublish goodsPublish, BindingResult bindingResult);

    @ApiOperation("修改宝贝")
    Result<?> updateBaby(GoodsPublish goodsPublish, BindingResult bindingResult);

    @ApiOperation("分页查询商品详细信息")
    Result<?> goodsInfoPage(Integer page, Integer size);

    @ApiOperation("根据id查询商品详细信息")
    Result<?> goodsInfoPageByGoodsId(Long goodsId);

    @ApiOperation("宝贝详情页")
    Result<?> detailPage(String goodsId);

    @ApiOperation("商品详情数据（后台审核商品查看商品信息，不包含优惠券、店铺等信息）")
    Result<?> goodsCheckInfo(String goodsId);

    @ApiOperation("根据店铺id查询所有商品（id+名称）")
    Result<?> querySimpleByShop(Long shopId, String key, Integer page, Integer size);

    @ApiOperation("检查sku是否有效（商品是否下架 库存是否大于0）")
    Result<?> checkSku(Long skuId);

    @ApiOperation("批量检查sku是否有效（商品是否下架 库存是否大于0且满足下单量）")
    Result<?> checkSkuBatch(Map<Long, Integer> data);

    @ApiOperation("检查spu是否有效（商品是否下架）")
    Result<?> checkSpuBatch(List<Long> goodsIdList);

    @ApiOperation("根据商品id查询品牌id")
    Result<?> queryBrandIdByGoodsId(Long goodsId);


    @ApiOperation("下单修改库存")
    Result<?> updateStock(Integer oper, Map<Long, Integer> stockMap);

    @ApiOperation("增加销量")
    Result<?> addSellCount(Map<Long, Integer> sellCountMap);

    @ApiOperation("修改上下架状态")
    Result<?> updateSellStatus(Map<String, String> sellStatusMap);

    @ApiOperation("商家查看商品列表")
    Result<?> shopGoodsList(GoodsSearch goodsSearch, Integer page, Integer size);

    @ApiOperation("用户足迹商品数据")
    Result<?> userFoot(List<Long> goodsId);

    @ApiOperation("用户关注的商品")
    public Result<?> followGoods(List<Collect> collectList);

    @ApiOperation("后台商品相关信息统计")
    public Result<?> msGoodsOverView();

}
